package com.treasure.mall.biz.repository.blacklist;

import com.treasure.mall.biz.base.JpaSearchableRepository;
import com.treasure.mall.biz.entity.blacklist.BlacklistPO;
import com.treasure.mall.zbq.common.ienum.SystemEnums;
import org.springframework.stereotype.Repository;

/**
 *
 * <p>
 * +---------------------------------------------------------
 * * @package: com.treasure.mall.biz.repository.blacklist
 * * @author: guomw (guomwchen@foxmail.com)
 * * @date: 2020/9/23 2:24 下午
 * * @since: V1.0.0
 * +---------------------------------------------------------
 * 注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的
 * 
 */
@Repository
public interface BlacklistRepository extends JpaSearchableRepository<BlacklistPO, Long> {

    /**
     * 判断用户是否在黑名单
     *
     * @param blacklistType
     * @param userId
     * @return
     */
    long countByBlacklistTypeAndUser_UserId(SystemEnums.BlacklistType blacklistType, Long userId);
}
